
import java.io.*;
import java.util.*;

public class Answer2 {
    //dd爱框框
    //https://ac.nowcoder.com/acm/problem/221681
    public static void main01(String[] args) throws IOException{
        Read in=new Read();
        int n=in.nextInt();
        int x=in.nextInt();
        int[] arr = new int[n + 1];
        for(int i = 1; i <= n; i++)
        {
            arr[i] = in.nextInt();
        }
        int left=1;
        int right=1;
        int sum=0;
        int retLeft=-1;
        int retRight=-1;
        // 用来记录区间最小长度
        int retlen=n;
        while(right<n){
            sum+=arr[right];
            while(sum>=x){
                if(right-left+1 <retlen){
                    retRight=right;
                    retLeft=left;
                    retlen=right-left+1 ;
                }
                sum-=arr[left++];

            }
            right++;
        }
        System.out.println(retLeft+" "+retRight);
    }


        public static PrintWriter out = new PrintWriter(new BufferedWriter(
                new OutputStreamWriter(System.out)));
        public static Read in = new Read();
        public static void main (String[] args) throws IOException {
            int n = in.nextInt();
            int x = in.nextInt();
            int[] a = new int[n];
            for (int i = 0; i < n; i++)   a[i] = in.nextInt();

            int ret = Integer.MAX_VALUE;    // 记录长度区间
            long sum = 0;    // 记录 总值
            int prevleft = 0; // 记录合理区间的 l，若相同，则不变
            for (int l = 0, r = 0; r < n; r++) {
                sum += a[r];
                while (sum >= x) {
                    sum -= a[l++];
                    // 这里就要进行更新
                    if (sum < x) {
                        if ((r - l + 2) < ret) {
                            ret = r - l + 2;
                            prevleft = l-1;
                        }
                    }

                }
            }


            System.out.printf("%d %d", prevleft + 1, prevleft + ret);
        }


}

class Read{
    // 用于字符串裁剪
    StringTokenizer st=new StringTokenizer("");

    // 这里是将 字节流 转化为 字符流
    BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));


    String next() throws IOException {
        while(!st.hasMoreTokens()){
            st=new StringTokenizer(bf.readLine());
        }
        return st.nextToken();
    }

    int nextInt() throws IOException
    {
        return Integer.parseInt(next());
    }
}